import request from '@/utils/requestExam'

//根据条件查询报名信息
export function getSignUpList(query){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/searchByPage/v1",
    method: "post",
    data: query
  })
}

//获取当前用户近期考试项
export function personExamProject(){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/person/project/v1",
    method: "post"
  })
}

//获取所有考试信息
export function getExamInfo(){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/getExamInfo/v1",
    method: "get"
  })
}

//根据id查询报名信息
export function getSignUpListById(id){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/signUpId/" + id,
    method: "get"
  })
}

//根据考生工号查询考生大部门和报名人员大部门
export function getSignUpDept(staffNo){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/get-sign-up-dept/" + staffNo,
    method: "get"
  })
}

//根据题库id查询报名人员列表信息
export function getSignUpListByQuestionBankId(questionBankId){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/questionBankId/" + questionBankId,
    method: "get"
  })
}

//新增报名信息
export function addSignUp(data){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/add/v1",
    method: "post",
    data: data
  })
}
//修改报名信息
export function updateSignUp(data){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/edit/v1",
    method: "put",
    data: data
  })
}

//继续考试设置
export function goOnExam(data){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/go-on-exam/v1",
    method: "post",
    data: data
  })
}

//删除报名信息
export function deleteSignUp(examSignUpIds){
  return request({
    url: "/api/uf/boostor/exam/signUp/ExamSignUpRest/remove/" + examSignUpIds,
    method: "delete"
  })
}
// 下载报名导入模板
export function importTemplate(isSkillAppraisal) {
  return request({
    url: '/api/uf/boostor/exam/signUp/ExamSignUpRest/importTemplate/' + isSkillAppraisal,
    method: 'get'
  })
}
// 导出报名信息
export function exportSignUp(data) {
  return request({
    url: '/api/uf/boostor/exam/signUp/ExamSignUpRest/export/v1',
    method: 'post',
    data: data
  })
}
